package com.example.service.impl;

import com.example.dao.OrdersDetailDao;
import com.example.entity.OrdersDetail;
import com.example.service.OrdersDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrdersDetailServiceImpl implements OrdersDetailService {
    @Autowired
    OrdersDetailDao ordersDetailDao;
    @Override
    public boolean addDetail(OrdersDetail ordersDetail) {
        return ordersDetailDao.addDetail(ordersDetail)>0;
    }

    @Override
    public OrdersDetail getAllDetailByOid(int oid) {
        return ordersDetailDao.getAllDetailByOid(oid);
    }
}
